<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="${backPath}/images/skin.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style type="text/css">
<!--
body {
	font-size:12px;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
-->
</style>
<script type="text/javascript" language="javascript" src="${cardPath}/common/common.js"></script>
<script type="text/javascript">
	function check(){
		var resourceTitle = document.getElementById("resourceTitle");
		var myFile = document.getElementById("myFile");
		try{			
			if(resourceTitle.value.trim().length == 0){
				alert("标题不能为空!");
				resourceTitle.focus();
				return;
			}
			if(myFile.value.trim().length == 0){
				alert("请选择上传文件!");
				myFile.focus();
				return;
			}
			var form = document.getElementById("fileform");
			form.action="${cardPath}/add_Resources.action";
			form.submit();
		}catch(e){
			alert("上传文件不存在!");
			myFile.focus();
		}
	}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="${backPath}/images/mail_leftbg.gif"><img src="${backPath}/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="${backPath}/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">上传资料</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="${backPath}/images/mail_rightbg.gif"><img src="${backPath}/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="${backPath}/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2" valign="top">&nbsp;</td>      
      </tr>
      <tr>
        <td colspan="2" valign="top">
          <!--HTML-->
          <table class=main_tab id=mainTable cellspacing=0
cellpadding=0 width=100% border=0>
            <!--TBODY-->
            <tbody>
              <tr>
                <td valign=top>
                <table width="98%" height="286" border=0 align="center" cellpadding=0 cellspacing=0>
                  <tbody>
                    <tr>
                      <td height="5" colspan="4"></td>
                    </tr>
                    <tr>
                      <td width="2%" bgcolor="#FAFBFC">&nbsp;</td>
                      <td height="251" colspan="3" align="center" valign="middle" bgcolor="#FAFBFC"><table width="100%" border="0" cellspacing="5" cellpadding="5">
                        <tr>
                          <td width="11%">&nbsp;</td>
                          <td width="77%">&nbsp;</td>
                          <td width="12%">&nbsp;</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td><div align="center">
                            <table width="800px" border="0" cellspacing="5" cellpadding="0">
                             <!--  <tr>
                                <td width="11%">&nbsp;</td>
                                <td width="35%">&nbsp;</td>
                                <td width="54%"><label>
                                  
                                          <div align="center">
                                            <table width="55%" border="0" cellspacing="1" cellpadding="5">
                                              <tr>
                                                <td><div align="right">
                                                  <input type="submit" name="add" id="add" value="增加" />
                                                  <input type="submit" name="button" id="button" value="减少" />                                          
                                                </div>
                                                <div align="right"></div></td>
                                              </tr>
                                            </table>
                                          </div>
                                </label></td>
                              </tr> -->
                              <form action="" method="post" enctype="multipart/form-data" id="fileform">
                              <tr>
                                <td><div align="right">资料标题：</div></td>
                                <td><input type="text" name="resourceTitle" id="resourceTitle"  style="width:250px"/></td>
                                <td align="left">上传文件：
                                  <input type="file" name="myFile" id="myFile" style="width:255px"/></td>
                              </tr>
                              <tr>
                                <td height="15" colspan="3"><table width="100%" border="0" cellspacing="1" cellpadding="0">
                                  <tr>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td width="44%">&nbsp;</td>
                                    <td width="56%"><div align="left">
                                      <input type="button" id="save" value="上传" onclick="check()"/>
                                      <input type="button" name="reset" id="reset" value="返回" onclick="history.go(-1);"/>
                                    </div></td>
                                    </tr>
                                    </form>
                                </table>                                
                                <label></label></td>
                                </tr>
                            </table>
                            </div>                          </td>
                          <td>&nbsp;</td>
                        </tr>
                        
                        
                        
                      </table></td>
                    </tr>
                    <tr>
                      <td bgcolor="#FAFBFC">&nbsp;</td>
                      <td width="43%" height="25" bgcolor="#FAFBFC">&nbsp;</td>
                      <td width="6%" bgcolor="#FAFBFC">&nbsp;</td>
                      <td width="49%" height="25" bgcolor="#FAFBFC"><label></label></td>
                    </tr>
                    <tr>
                      <td height="5" colspan="4"></td>
                    </tr>
                  </tbody>
                </table></td>
              </tr>
            </tbody>           
          </table></td>
      </tr>
    </table></td>
    <td background="${backPath}/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="${backPath}/images/mail_leftbg.gif"><img src="${backPath}/images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="${backPath}/images/buttom_bgs.gif"><img src="${backPath}/images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="${backPath}/images/mail_rightbg.gif"><img src="${backPath}/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
</html>